//
//  HBNovelInfoCell.m
//  HeartBeat
//
//  Created by karong on 2023/8/28.
//

#import "HBNovelInfoCell.h"
#import "UIView+WSDraw.h"

@interface HBNovelInfoCell ()
@property (weak, nonatomic) IBOutlet UIImageView *bgImageView;
@property (weak, nonatomic) IBOutlet UILabel *infoLabel;
@property (weak, nonatomic) IBOutlet UIView *bottomView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@end

@implementation HBNovelInfoCell
- (void)awakeFromNib {
    [super awakeFromNib];
    [self.bottomView setupRoundedCornersWithCutCorners:(UIRectCornerTopLeft|UIRectCornerTopRight) withRadii:CGSizeMake(10, 10)];
}

- (void)setDataWithObject:(HBNovelModel *)object {
    [super setDataWithObject:object];
//    self.backgroundColor = object.mostColor;
    self.infoLabel.text = SF(@"%@·%@·%@", KEmptyStr(object.author), KEmptyStr(object.finish_txt), KEmptyStr(object.word_txt));
//    if (![HBTool isLighterColor:object.mostColor]) {
//        self.infoLabel.textColor = UIColor.font_white_ffffff;
//        self.nameLabel.textColor = UIColor.font_white_ffffff;
//    }
    [self.bgImageView sd_setImageWithURL:[NSURL URLWithString:object.thumb] placeholderImage:HBPlaceholderImage];
}
@end
